Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

Internet radio streams often embed track metadata via ICY (Icecast/Shoutcast) protocol. This PR extracts and displays "now playing" information when available.

Changes

  • StreamMetadata model - Holds parsed metadata (StreamTitle, Artist, Title) with display formatting
  • StreamMetadataService - Connects with Icy-MetaData: 1 header, reads icy-metaint intervals, parses StreamTitle='Artist - Song'; format, polls every 15s
  • RadioPlayerService integration - Starts/stops metadata polling on play/pause, exposes CurrentMetadata property and StreamMetadataChanged event
  • PlayerViewModel - Exposes NowPlaying and HasNowPlaying for UI binding
  • PlayingPage.xaml - Displays now playing section when metadata available
  • App.xaml.cs - Updates tray icon tooltip with current song details when playing (truncated to 60 chars for readability)

How ICY metadata works

Client → Server: Icy-MetaData: 1
Server → Client: icy-metaint: 8192

[8192 bytes audio][1 byte len][len*16 bytes metadata][8192 bytes audio]...

Metadata: StreamTitle='Artist - Song';

The service reads past the audio chunk, extracts the metadata block, and parses artist/title from common separator formats (-, , ).

Original prompt

This section details on the original issue you should resolve

<issue_title>Get metadata about streaming content</issue_title>
<issue_description>Does stream URL contain content about song and artist? Maybe another URL on the radio station DB Item contains information about "current now playing"</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 4, 2025 20:45
Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
…iency

Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
Copilot AI changed the title [WIP] Add metadata retrieval for streaming content Add ICY metadata extraction for now playing info Dec 4, 2025
Copilot AI requested a review from TheJoeFin December 4, 2025 20:56
@TheJoeFin
Copy link
Owner

@copilot looks great! Also update the Tooltip on the NotifyIcon with the song details if available

Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 4, 2025

@copilot looks great! Also update the Tooltip on the NotifyIcon with the song details if available

Done in f0afcaf. The tray icon tooltip now shows the current song when playing:

  • "Trdo (Playing)\n{Artist - Title}" when now playing info is available
  • "Trdo (Playing)" when no metadata available
  • "Trdo (Paused)" when stopped

Long song titles are truncated to 60 characters to keep the tooltip readable.

Introduced a new "Now Playing" page to display detailed stream
metadata, including artist, title, and stream information. Added
a ViewModel to manage metadata and handle Discogs search. Updated
project file to include the new page in the build process.
Enhanced BooleanToVisibilityConverter with inversion logic.
Added "Now Playing" button to PlayingPage with navigation
support to details page. Updated ShellViewModel for page
navigation.
Refactored `NavigationService` and `ShellViewModel` to use `ObservableObject` from `CommunityToolkit.Mvvm`, simplifying property change notifications. Added `RelayCommand` attributes for navigation commands in `ShellViewModel`. Updated `AddStation.xaml.cs` to reset navigation stack history after saving. Improved null checks and added debug logging in `NavigationService`. Included `CommunityToolkit.Mvvm` package reference in `Trdo.csproj`. Performed general cleanup and formatting improvements.
Introduced a "Search on Spotify" feature alongside the existing
"Search on Discogs" functionality. Updated the UI to include a
new button with an SVG icon for Spotify. Added backend logic
to handle Spotify searches via the app or web fallback. Included
the `spotify.svg` asset in the project.
@TheJoeFin TheJoeFin marked this pull request as ready for review December 5, 2025 06:24
@TheJoeFin TheJoeFin merged commit 679fe37 into main Dec 5, 2025
1 check passed
@TheJoeFin TheJoeFin deleted the copilot/get-metadata-for-streaming-content branch December 5, 2025 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get metadata about streaming content

2 participants